<div class="breadcrumbwidget">
	<ul class="skins">
        <li><a href="default" class="skin-color default"></a></li>
        <li><a href="orange" class="skin-color orange"></a></li>
        <li>&nbsp;</li>
        <li class="fixed"><a href="" class="skin-layout fixed"></a></li>
        <li class="wide"><a href="" class="skin-layout wide"></a></li>
    </ul><!--skins-->
	<ul class="breadcrumb">
        <li><a href="<?php echo $baseurl?>">Trang chủ</a> <span class="divider">/</span></li>
        <li class="active">Quản lý chương trình</li>
    </ul>
</div><!--breadcrumbwidget-->
<div class="pagetitle">
	<h1>Sửa câu hỏi</h1> <span></span>
</div><!--pagetitle-->

<div class="maincontent">
<?php if(validation_errors()): ?>
    <div class="alert alert-error" style="margin: 10px 10px 10px 40px;">
      <button data-dismiss="alert" class="close" type="button">×</button>
      <?php echo validation_errors(); ?>
    </div>
<?php endif;?>
<?php if(!in_array($data, array(null, '', '0')) && $data == 100): ?>
    <div class="alert alert-error" style="margin: 10px 10px 10px 40px;">
      <button data-dismiss="alert" class="close" type="button">×</button>
        <span>Sửa câu hỏi thất bại!</span>
    </div>
<?php endif;?>
	<div class="contentinner content-dashboard">
    
    <?php $attr = array('class' => 'stdform'); echo form_open('', $attr)?>
    
        <p>
            <label>Chọn nhóm câu hỏi</label>
            <span class="field">
                <?php echo $fview->selectType($quest, @$id_cat ? @$id_cat : $data['categories_id'], 'cat_q');?>
            </span>
        </p>
        <p>
        	<label>Nội dung câu hỏi</label>
            <span class="field"><input type="text" name="question" class="input-xlarge" placeholder="Nhập câu hỏi" value="<?php echo json_decode($data['content'])->question;?>"/></span>
        </p>
        <?php $fv = json_decode($data['content']); foreach($fv->choice AS $key=>$value):?>
        <p>
        	<label>Phương án <?php echo $key;?></label>
            <span class="field"><input type="text" name="choice-<?php echo $key;?>" class="input-xlarge" placeholder="Nhập phương án <?php echo $key;?>" value="<?php echo $value; ?>"/></span>
        </p>
        <?php endforeach;?>
        <p>
        	<label>Đáp án</label>
            <span class="field"><input type="text" name="answer" class="input-xlarge" placeholder="Nhập đáp án" value="<?php echo $data['answer'];?>"/></span>
        </p>
        <p>
            <label></label>
            <button class="btn btn-rounded" type="submit"> <i class="iconfa-ok"></i> &nbsp; Lưu</button>
        </p>
    </form>
    
    </div>
</div>